package dynamicprogramming;

public class Solution70{
    public static void main(String[] args) {
        Solution70 solution70 = new Solution70();
        System.out.println(solution70.climbStairs(6));
    }
    public int climbStairs(int n) {
        if (n <=3 ) return n;
        int a = 2;
        int b = 3;
        int c = 0;
        for (int i = 4; i <= n; i++) {
            c = a + b;
            a = b;
            b = c;
        }
        return c;
    }
}
